home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / lang / amigatalk.lha / help / boopsidocs / clicktab_gc.doc < prev    next >
Text File  |  2000-10-07  |  9KB  |  275 lines

  1. TABLE OF CONTENTS
  2.  
  3. clicktab_gc/--datasheet--
  4. clicktab_gc/CLICKTAB_GetClass
  5. clicktab_gc/AllocClickTabNodeA
  6. clicktab_gc/FreeClickTabNode
  7. clicktab_gc/GetClickTabNodeAttrsA
  8. clicktab_gc/SetClickTabNodeAttrsA
  9.  
  10. clicktab_gc/--datasheet--                        clicktab_gc/--datasheet--
  11.  
  12.     NAME
  13.         clicktab.gadget--File folder tabs gadget.
  14.  
  15.     SUPERCLASS
  16.         gadgetclass
  17.  
  18.     REQUIRES
  19.         None.
  20.  
  21.     DESCRIPTION
  22.         The tabs gadget class provides a custom control that has imagery
  23.         similar in style to the tabs seen in a drawer full of file folders.
  24.         The action of the gadget is the same as a conventional
  25.         mutual-exclusion control in that only one tab can be active at a
  26.         time and a tab is selected by clicking upon it.
  27.  
  28.         The purpose of the tabs gadget class is to provide functionality like
  29.         the page selection cycle gadget on the top-right side of the AmigaOS
  30.         2.1 PrinterPS preferences editor, but allowing all the choices to be
  31.         visible at the same time. The tab "bar" allows strumming across the
  32.         selections. The current selection is slightly raised and its text
  33.         label displayed in bold.
  34.  
  35.     METHODS
  36.         OM_NEW -- Create the button gadget.  Passed to superclass, then OM_SET.
  37.  
  38.         OM_GET -- Get an object attribute.  Passed to superclass for unknown
  39.             attributes.
  40.  
  41.         OM_SET -- Set object attributes.  Passed to superclass first.
  42.  
  43.         OM_UPDATE -- Set object notification attributes.  Passed to superclass
  44.             first.
  45.  
  46.         OM_NOTIFY -- Sets  taglist for notification and pass to superclass.
  47.  
  48.         GM_DOMAIN -- Calculate imagery & positioning, and return
  49.             minimum/maximum domain size.
  50.  
  51.         GM_RENDER -- Renders the gadget imagry.  Overrides the superclass.
  52.  
  53.         GM_HITTEST -- Determines if mouse is within the gadget rectangle.
  54.             Overrides the superclass.
  55.  
  56.         GM_GOACTIVE -- Handles activation, toggle-select and button-select.
  57.             Overrides the superclass.
  58.  
  59.         GM_GOINACTIVE -- Deactivates object.  Overrides the superclass.
  60.  
  61.         GM_HANDLEINPUT -- Handles selection input, RMB undo/abort, etc.
  62.  
  63.         GM_KEYACTIVE -- Activates gadget via keyboard, selects appropriate
  64.             tab based on input key.  Invoked by window.class only.
  65.  
  66.         GM_KEYINACTIVE -- Deactivates gadget.  Invoked by window.class only.
  67.  
  68.         All other methods are passed to the superclass, including OM_DISPOSE.
  69.  
  70.     ATTRIBUTES
  71.  
  72.         GA_ID (WORD)
  73.             Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_NOTIFY)
  74.  
  75.         GA_Top (LONG) 
  76.             The top of the gadget.  Typically win->BorderTop + 2 for proper
  77.             placement along the inner top of a window unless used within a
  78.             layout gadget group, then placement is automatic.
  79.  
  80.         GA_Left (LONG)
  81.             The left edge of the gadget.
  82.  
  83.         GA_Height (LONG)
  84.             Height of the gadget.  Typically font height plus eight.
  85.  
  86.         GA_RelHeight (LONG)
  87.             Like all other ReAction gadgets, this attribute is supported.
  88.             However, due to the nature of the classes intended visuals
  89.             it is stylistically a bad thing to do.
  90.  
  91.         GA_Disabled (BOOL) -- Determines whether the gadget is disabled or
  92.             not.  Changing disable state will invoke GM_RENDER.  A disabled
  93.             gadget's border and label are all rendered in SHADOWPEN and then
  94.             dusted in a ghosting pattern that is rendered in SHADOWPEN.
  95.  
  96.             Defaults to FALSE.
  97.  
  98.         GA_TextAttr (struct TextAttr *)
  99.             Optional text attribute for the font to use for the labels.
  100.  
  101.             Defaults to NULL.
  102.  
  103.         CLICKTAB_Labels (struct List *)
  104.             A list of clicktab node structures used to indicate the labels
  105.             for each of the tabs.
  106.  
  107.             Defaults to NULL.
  108.  
  109.             Applicability is (OM_NEW)
  110.  
  111.         CLICKTAB_Current (LONG)
  112.             Currently selected tab.
  113.  
  114.             Defaults to 0.
  115.  
  116.             Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_NOTIFY)
  117.  
  118.     NOTES
  119.  
  120.         This class is best suited for use in a ReAction layout group
  121.         and requires receiving GM_DOMAIN prior to the first GM_RENDER
  122.         in order to size & position its imagery correctly.
  123.  
  124. clicktab_gc/CLICKTAB_GetClass                clicktab_gc/CLICKTAB_GetClass
  125.  
  126.     NAME
  127.         CLICKTAB_GetClass  --  Gets the pointer to the clicktab class.
  128.  
  129.     SYNOPSIS
  130.         clicktab_class = CLICKTAB_GetClass();
  131.         D0
  132.  
  133.         Class * CLICKTAB_GetClass(VOID);
  134.  
  135.     FUNCTION
  136.         Obtains the pointer to the ClickTab gadget class for use with
  137.         NewObject().  This function always returns a valid pointer so
  138.         you do not need to check it.  The reason is that if the library
  139.         opens fine, then the pointer returned is already setup.  (Of course
  140.         this implies that if opening the library fails, you shouldn't be
  141.         calling this.)
  142.  
  143.         Note that this function does not create the class, that is done
  144.         when the class library is opened.
  145.  
  146.     INPUTS
  147.         Nothing.
  148.  
  149.     RESULT
  150.         clicktab_class - Pointer to the ClickTab gadget class.
  151.  
  152.     SEE ALSO
  153.  
  154. clicktab_gc/AllocClickTabNodeA              clicktab_gc/AllocClickTabNodeA
  155.  
  156.     NAME
  157.         AllocClickTabNodeA -- Allocate a ClickTab node.
  158.  
  159.     SYNOPSIS
  160.         struct Node * AllocClickTabNode(Tag, ...)
  161.         node = AllocClickTabNode(Tag, ...)
  162.  
  163.         struct Node * AllocClickTabNodeA(struct TagItem *)
  164.         node = AllocClickTabNodeA(taglist)
  165.  
  166.     FUNCTION
  167.         Allocates a node that can be added to the Exec linked list of
  168.         labels in the clicktab.  This is the only way to allocate a
  169.         node for this list, you cannot allocate nodes yourself because
  170.         the ClickTab class uses a private node structure.
  171.  
  172.     INPUTS
  173.         columns - How many columns your ClickTab has.
  174.         taglist - Attributes for the node, passed onto SetClickTabNodeAttrsA().
  175.  
  176.     RESULT
  177.         node - A node that can be added into the Exec list of labels for
  178.             a ClickTab gadget.
  179.  
  180.     SEE ALSO
  181.         FreeClickTabNode(), SetClickTabNodeAttrsA()
  182.  
  183. clicktab_gc/FreeClickTabNode                   clicktab_gc/FreeClickTabNode
  184.  
  185.     NAME
  186.         FreeClickTabNode -- Free a ClickTab node.
  187.  
  188.     SYNOPSIS
  189.         VOID FreeClickTabNode(struct Node *)
  190.         FreeClickTabNode(node)
  191.  
  192.     FUNCTION
  193.         Frees a ClickTabNode allocated with AllocClickTabNodeA().
  194.  
  195.     INPUTS
  196.         node - The node to free.
  197.  
  198.     SEE ALSO
  199.         AllocClickTabNodeA()
  200.  
  201. clicktab_gc/GetClickTabNodeAttrsA         clicktab_gc/GetClickTabNodeAttrsA
  202.  
  203.     NAME
  204.         GetClickTabNodeAttrsA -- Get attributes about a ClickTab node.
  205.  
  206.     SYNOPSIS
  207.         VOID GetClickTabNodeAttrs(struct Node *, Tag, ...)
  208.         GetClickTabNodeAttrs(node, firsttag, ...)
  209.  
  210.         VOID GetClickTabNodeAttrsA(struct Node *, struct TagItem *)
  211.         GetClickTabNodeAttrsA(node, taglist)
  212.  
  213.     FUNCTION
  214.         The ClickTab uses a private node structure and all attributes
  215.         are hidden, and must therefore be accessed with this function.
  216.  
  217.     INPUTS
  218.         node - The ClickTab node to get the information on.
  219.         taglist - A tag list of attributes to get.  ti_Tag is the attribute
  220.             to get and ti_Data is a pointer to a location to copy the result
  221.             to.  The exception is LBNA_Column, which is used to specify a
  222.             column to get attributes on.
  223.  
  224.     SEE ALSO
  225.         SetClickTabNodeAttrsA()
  226.  
  227. clicktab_gc/SetClickTabNodeAttrsA         clicktab_gc/SetClickTabNodeAttrsA
  228.  
  229.     NAME
  230.         SetClickTabNodeAttrsA -- Set attributes of a ClickTab node.
  231.  
  232.     SYNOPSIS
  233.         VOID SetClickTabNodeAttrs(struct Node *, Tag, ...)
  234.         SetClickTabNodeAttrs(node, firsttag, ...)
  235.  
  236.         VOID SetClickTabNodeAttrsA(struct Node *, struct TagItem *)
  237.         SetClickTabNodeAttrsA(node, taglist)
  238.  
  239.     FUNCTION
  240.         Changes attributes for a ClickTab node.  Since the ClickTab
  241.         class uses a private node structure, this is the only way to change
  242.         node attributes.
  243.  
  244.         You may NOT change node attributes when the node is in a list
  245.         attached to a ClickTab gadget.  You must first detach the list
  246.         with CLICKTAB_Labels, ~0 before you can change attributes, and
  247.         then re-attach the list, and re-render the gadget to reflect
  248.         any changes. This should include re-domaining the gadget.
  249.         If used in a layout group, turn off domain caching for the
  250.         clicktab object if you intend to dynamically alter the tabs
  251.         and refresh the layout group with RethinkLayout().
  252.  
  253.     TAGS
  254.         TNA_Text (STRPTR)
  255.  
  256.             Text string to appear as a line in the ClickTab menu node.
  257.  
  258.         TNA_Number (WORD)
  259.  
  260.             ID Number assigned to a ClickTab menu node
  261.  
  262.         TNA_TextPen (WORD) 
  263.  
  264.             Specifies pen number to use for the label.
  265.  
  266.             Defaults to pens[TEXTPEN].
  267.  
  268.     INPUTS
  269.         node - Node whose attributes you are changing.
  270.         taglist - Tag list of attributes to change.
  271.  
  272.     SEE ALSO
  273.         GetClickTabNodeAttrsA()
  274.  
  275.